package com.itheima.reflectlearn;
/*
Method
 */
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;

public class ReflectTest08 {
    public static void main(String[] args) throws ClassNotFoundException {

        Class userServiceClass = Class.forName("com.itheima.reflectlearn.UserService");

        Method[] methods = userServiceClass.getDeclaredMethods();
        //System.out.println(methods.length);

        for(Method method:methods){
            System.out.print(Modifier.toString(method.getModifiers())+" ");
            System.out.print(method.getReturnType().getName()+" ");
            System.out.print(method.getName()+"(");

            Class[] parameterTypes = method.getParameterTypes();
            for(Class parameterType: parameterTypes){
                System.out.print(parameterType.getSimpleName()+" ");
            } 
            System.out.println("){}");
        }

    }

}
